<?php
namespace app\shop\model;
use app\BaseModel;
use think\facade\Db;



class AdminShopCollageList extends BaseModel
{
    //定义表名
    protected $name = 'longbing_card_shop_collage_list';

    /**
     * @param $value
     * @param $data
     * @return mixed
     * 状态
     */
    public function getcollageStatusAttr($value){
        if(in_array($value,[1,2,3,4])){
            $status = [1=>'拼团中',2=>'拼团完成',3=>'拼团完成',4=>'拼团超时'];
            return $status[$value];
        }
    }
    /**
     * @param $dis
     * @param int $page
     * @return mixed
     * 获取拼团列表
     */
    public function collageList($dis,$page = 10){
        $data = self::where($dis)->order('id desc')->paginate($page)->toArray();
        return $data;
    }





}